﻿using System.Drawing;

namespace PlusPlusPaint.Layers
{
    class LayerSummary
    {
        #region member variables
        ILayer layer;
        #endregion

        #region properties
        public Image VisualRepresentation
        {
            get
            {
                Image im = new Bitmap(ClientRectangle.Right + 1, ClientRectangle.Bottom + 1);
                layer.BurnOn(im);
                return im;
            }
        }

        public Point Location
        {
            get
            {
                return layer.Location;
            }
        }

        public Size Size
        {
            get
            {
                return layer.Size;
            }
        }

        public Rectangle ClientRectangle
        {
            get
            {
                return layer.ClientRectangle;
            }
        }

        public bool Visible
        {
            get
            {
                return layer.Visible;
            }
        }

        public string Name
        {
            get
            {
                return layer.Name;
            }
            set
            {
                layer.Name = value;
            }
        }
        #endregion

        #region constructors
        public LayerSummary(ILayer layer)
        {
            this.layer = layer;
        }
        #endregion

        #region public methods
        public bool IsLayer(ILayer l)
        {
            return l == this.layer;
        }
        #endregion
    }
}
